<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>perspective</title>
  <style>
    .box{
      position: relative;
      width: 200px;
      height: 400px;
      background-color: red;
      margin: 0 auto;

      /* 视线高度 */
      perspective: 400px;

      transform-style: preserve-3d;
      /* 子元素需要遵循怎样的空间体系规则 */
      transition: 1s;
      /* 元素背面是否可见 */
      backface-visibility: hidden;

    }
    .w{
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: green;
      transform: rotateX(45deg);
    }
    .box:hover{
      /* transform: rotate3d(.5, .5, .5, 180deg); */
      transform: rotateY(360deg);
    }
  </style>
</head>
<body>
  <div class="box">
    <div class="w">

    </div>
  </div>
</body>
</html>